{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试前端页面使用django-ckeditor</title>
    <link rel="stylesheet" href="{% static 'blog/css/bootstrap.min.css' %}">
    <script src="{% static 'ckeditor/ckeditor-init.js' %}"></script>
    <script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
    <script>
    CKEDITOR.env.isCompatible = true;
    </script>
</head>
<body>
    <div class="row">
        <div class="col-md-offset-2 col-md-8">
            <form action="" novalidate method="post" class="form-horizontal" enctype="multipart/form-data">
                {% csrf_token %}
                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">文章标题</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="title" name="title" value="{{ blog.title }}">
                    </div>
                </div>
                <div class="from-group">
                    <label for="body" class="col-sm-2 control-label">文章内容</label>
                    <div class="col-sm-10">
                        <textarea id="body" name="body">{{ blog.body }}</textarea>
                        <script>
                            CKEDITOR.replace('body', {
                                width:860,
                                height:600,
                                filebrowserBrowseUrl: '/ckeditor/browse/',
                                filebrowserUploadUrl: '/ckeditor/upload'
                            });
                        </script>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script src="{% static 'blog/js/jquery.js' %}"></script>
    <script src="{% static 'blog/js/bootstrap.min.js' %}"></script>
</body>
</html>